package com.learning.db.optimization;

import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;

public class GroupPerson extends WritableComparator {

    public GroupPerson() {
        super(DBYB_dataBean.class, true);
    }

    @Override
    public int compare(WritableComparable a, WritableComparable b) {
        DBYB_dataBean o1 = (DBYB_dataBean) a;
        DBYB_dataBean o2 = (DBYB_dataBean) b;
        return o1.getPersonId().compareTo(o2.getPersonId());
    }
}